package com.yiwyn.zero.fetcher;

import com.yiwyn.zero.Customer;

/**
 * 客户抓取器
 */
public class CustomerFetcher {

    private Customer customer;

    public CustomerFetcher(Customer customer) {
        this.customer = customer;
    }

    public enum CustomerField {
        NAME,
        PHONE,
        GENDER,
    }


    public Object getValue(CustomerField customerField) {
        switch (customerField) {
            case NAME:
                return customer.getName();
            case PHONE:
                return customer.getPhone();
            case GENDER:
                return customer.getGender();
        }
        return null;
    }
}
